from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
import django.contrib.auth.views
admin.autodiscover()

from publicacoes.models import *
from ingenium.feeds import *
from ingenium.forms import *

feeds = {
    'ultimos': UltimosArtigos,
    'ultimas': UltimasNoticias,
}
handler500 = 'ingenium.views.page_not_found'
handler404 = 'ingenium.views.page_not_found'

urlpatterns = patterns('',
    (r'^js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'templates/js'}),
    (r'^admin/', include(admin.site.urls)),
    url(r'^admin_tools/', include('admin_tools.urls')),
    #url(r'^newsletters/', include('emencia.django.newsletter.urls')),
    (r'^rss/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',{'feed_dict': feeds}),
    (r'^comments/', include('django.contrib.comments.urls')),
    (r'artigo/(?P<slug>[\w_-]+)/$', 'ingenium.views.artigo'),
	(r'^noticia/(?P<slug>[\w_-]+)/$', 'ingenium.views.noticia'),
	(r'^destaque/(?P<slug>[\w_-]+)/$', 'ingenium.views.destaque'),
	(r'^$', 'ingenium.views.homepage'),
    (r'index', 'ingenium.views.homepage'),
    (r'^comments/', include('django.contrib.comments.urls')),
    (r'artigos', 'ingenium.views.artigos'),
    (r'fotosgalaxy', 'ingenium.views.fotosgalaxy'),
    (r'noticias', 'ingenium.views.noticias'),
    (r'eventos', 'ingenium.views.eventos'),
    (r'cadastrarcurriculo1', 'ingenium.views.cadastrarcurriculo1'),
    (r'cadastrarcurriculo', 'ingenium.views.cadastrarcurriculo'),
    (r'cadastrarempresa', 'ingenium.views.cadastrarempresa'),
    #(r'cadastrocurso', 'ingenium.views.cadastrocurso'),
    (r'cadastrocurso/(?P<curso_id>\d+)/$', 'ingenium.views.cadastrocurso'),
    (r'news', 'ingenium.views.news'),
    (r'aviso', 'ingenium.views.aviso'),
    (r'procura/(?P<vag_id>\d+)/$', 'ingenium.views.procura'),
    (r'buscae','ingenium.views.buscae'),
    (r'buscap','ingenium.views.buscap'),
    (r'duvidas', 'ingenium.views.duvidas'),
    (r'ultimasvagas', 'ingenium.views.ultimasvagas'),
    (r'vaga/(?P<vaga_id>\d+)/$', 'ingenium.views.vaga'),
    (r'contato', 'ingenium.views.contato'),
    (r'imprensa', 'ingenium.views.imprensa'),
    (r'politica', 'ingenium.views.politica'),
    (r'servicos', 'ingenium.views.servicos'),
    (r'incompany', 'ingenium.views.incompany'),
    (r'abertos', 'ingenium.views.abertos'),
    (r'vantagens', 'ingenium.views.vantagens'),
    (r'treinamento', 'ingenium.views.treinamento'),
    (r'sobre', 'ingenium.views.sobre'),
    (r'publicidade', 'ingenium.views.publicidade'),
    (r'empresaservico', 'ingenium.views.empresaservico'),
    (r'carta', 'ingenium.views.carta'),
    (r'procura2', 'ingenium.views.procura2'),
    (r'analise', 'ingenium.views.analise'),
    (r'destaques', 'ingenium.views.destaques'),
    (r'^cadastro/', include('ingenium.urls')),
	(r'login/(?P<user_id>\d+)/$', 'ingenium.views.login'),
	(r'sair', 'ingenium.views.sair'),
    (r'painel-usuario-cadastro/(?P<user_id>\d+)/$', 'ingenium.views.usuarioCadastro'),
    (r'painel-usuario-sugestao/(?P<user_id>\d+)/$', 'ingenium.views.usuariosugestao'),
    (r'painel-usuario-curriculo/(?P<user_id>\d+)/$', 'ingenium.views.usuarioCurriculo'),
    (r'painel-usuario-cursos/(?P<user_id>\d+)/$', 'ingenium.views.usuarioCursos'),
    (r'painel-usuario-dashboard/(?P<user_id>\d+)/$', 'ingenium.views.usuarioDashboard'),
    (r'painel-usuario-interna/(?P<user_id>\d+)/$', 'ingenium.views.usuarioInterna'),
    (r'painel-usuario-mensagens/(?P<cod>\d+)/$', 'ingenium.views.usuarioMensagens'),
    (r'painel-usuario-perguntas/(?P<user_id>\d+)/$', 'ingenium.views.usuarioPerguntas'),
    (r'painel-usuario-relatorio/(?P<user_id>\d+)/$', 'ingenium.views.usuarioRelatorio'),
    (r'painel-empresa-cadastrar-vagas/(?P<cad>\d+)/$', 'ingenium.views.empresaVagas'),
    (r'painel-empresa-interna/(?P<user_id>\d+)/$', 'ingenium.views.empresaInterna'),
    (r'painel-empresa-cadastro/(?P<user_id>\d+)/$', 'ingenium.views.empresaCadastro'),
    (r'painel-empresa-dashboard/(?P<dash_id>\d+)/$', 'ingenium.views.empresaDashboard'),
    (r'painel-empresa-gerenciar-vagas/(?P<vaga_id>\d+)/$', 'ingenium.views.empresaGerenciar'),
    (r'painel-empresa-relatorios/(?P<rel>\d+)/$', 'ingenium.views.empresaRelatorio'),
    (r'painel-empresa-mensagens/(?P<cod>\d+)/$', 'ingenium.views.empresaMensagens'),
    (r'painel-empresa-perguntas/(?P<per>\d+)/$', 'ingenium.views.empresaPerguntas'),
    (r'painel-empresa-cursos/(?P<curso_id>\d+)/$', 'ingenium.views.empresaCursos'),
    (r'painel-empresa-sugestao/(?P<user_id>\d+)/$', 'ingenium.views.empresaSugestao'),
#    (r'^password_reset/$', 'django.contrib.auth.views.password_reset'),
    (r'^password_reset/$', 'ingenium.views.password_reset'),
    (r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done',{'template_name':'ingenium/password_reset_done.html'}),
    (r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm', {'template_name':'ingenium/password_reset_confirm.html'}),
    (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete', {'template_name':'ingenium/password_reset_complete.html'}),
    (r'^media/(.*)$', 'django.views.static.serve',
     {'document_root': settings.MEDIA_ROOT}),
)
